//
//  RealtimeView.m
//  天气预报
//
//  Created by mac on 16/1/21.
//  Copyright © 2016年 YF_S. All rights reserved.
//

#import "RealtimeView.h"

@implementation RealtimeView

-(void)setModel:(RealtimeModel *)model{

    _model = model;
    
    //地点
    _city_name.text = _model.city_name;
    
    //阳历 时间
    _date.text = [NSString stringWithFormat:@"%@ %@",_model.date,_model.time];
    
    //阴历
    _moon.text = [NSString stringWithFormat:@"%@ 星期%@",_model.moon,_model.week];
    
    //wind
    _windspeed.text = [NSString stringWithFormat:@"风速:%@",_model.winModel.windspeed];
    
    _power.text = [NSString stringWithFormat:@"风力:%@%@",_model.winModel.direct,_model.winModel.power];
    
    //weather
    _humidity.text = [NSString stringWithFormat:@"湿度:%@",_model.weatherModel.humidity];
    
    _info.text = _model.weatherModel.info;
    
    _img.image = [UIImage imageNamed:[NSString stringWithFormat:@"%02d",[_model.weatherModel.img intValue]]];
}

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
